package cn.itcast.dao;

import cn.itcast.entity.User;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

/**
 * Created by luoshupeng on 2018-03-20 10:22
 */
@Repository
public interface UserRepository extends JpaRepository<User, Integer> {

    @Query(nativeQuery = true,value = "select * from user where id=:id")
    User findById(int id);
}
